﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CFSystem.JXC.BLL
{
    using CFSystem.JXC.IDAL;
    using CFSystem.JXC.Model;

    public class StockBLL
    {
        #region Fields
        private static readonly IStockDAL dal = DALFactory.DataAccess.CreateStock();
        #endregion

        #region Constructors
        public StockBLL()
        {
        }
        #endregion

        #region Methods
        public IList<StockInfo> GetAllStockRecords()
        {
            return dal.GetAllStockRecords();
        }

        public IList<StockInfo> SearchStockRecords(string strSearch)
        {
            return dal.SearchStockRecords(strSearch);
        }

        public void AddStockRecord(StockInfo stock)
        {
            dal.AddStockRecord(stock);
        }

        public void DeleteStockRecord(int recordID)
        {
            dal.DeleteStockRecord(recordID);
        }

        public void UpdateStockRecord(StockInfo stock)
        {
            dal.UpdateStockRecord(stock);
        }
        #endregion
    }
}
